package indigo6a.cloud.eshop;

import online.indigo6a.tryspringcloudsecurity.AuthServerApplication;
import online.indigo6a.tryspringcloudsecurity.model.User;
import online.indigo6a.tryspringcloudsecurity.repository.UserRepository;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest(classes = AuthServerApplication.class)
public class UserRepositoryDebug {
    @Autowired
    private UserRepository repository;
    @Test
    public void getUser() {
        Iterable<User> all = repository.findAll();
        all.forEach(System.out::println);
    }
    @Test
    public void findByUserName() {
        User alice = repository.findByUserName("alice");
        System.out.println(alice);
    }
}
